<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>css 制作三角形</title>
    <style>
        .container {
            border: 1px solid #ccc;
            padding: 10px;
            width: 200px;
            height: 200px;
            margin: 0 auto;
            /* display: flex; */
            flex-direction: row;
            /* justify-content: flex-start; */
        }

        .icon {
            width: 0;
            height: 0;
            border: 50px solid transparent;
        }
        .to-top {
            border-bottom-color: lightblue;
        }
        .to-right {
            border-left-color: lightblue;
        }
        .to-bottom {
            border-top-color: lightblue;
        }
        .to-left {
            border-right-color: lightblue;
        }
    </style>
</head>
<body>
    <div class="container">
        <p>向上：</p>
        <div class="icon to-top"></div>
    </div>
    <div class="container">
        <p>向右：</p>
        <div class="icon to-right"></div>
    </div>
    <div class="container">
        <p>向下：</p>
        <div class="icon to-bottom"></div>
    </div>
    <div class="container">
        <p>向左边：</p>
        <div class="icon to-left"></div>
    </div>
</body>
</html>